{    
Function:       _DateTime

Purpose:        Create text string of Bar Date, Bar Tim, BarNumber e and computer time (hh:mm:ss) 
                in format:  "12/31/09 1314 Bar = 1234 16:14:23  "

Author:         MarkSanDiego

Last Updated:   12/28/13 original version
                12/29/13 use BarDateTime to show bar time with seconds
}

vars:
    DateTime(0),
    Hours(0),
    Mins(0),
    Secs(0);
             
             
    DateTime = ComputerDateTime;             
    Secs  = FracPortion(DateTime) * ( 24 * 3600 ) ; 
    Hours = IntPortion( Secs / 3600 ) ; 
    Mins  = IntPortion ( ( Secs - ( Hours * 3600 ) ) / 60 ) ;          
    Secs  = Secs - ( Hours * 3600 ) - ( Mins * 60 ) ; 
         
    _DateTime = BarDateTime.ELFormatDate("MM/dd/yy ") & BarDateTime.ELFormatTime("HH:mm:ss ") 
        &  "Bar = " & NumToStr(BarNumber,0) & " " & RightStr("0" & NumToStr(Hours,0), 2) 
        & ":" & RightStr("0" & NumToStr(Mins,0), 2) & ":" & RightStr("0" & NumToStr(Secs, 0), 2) & "  ";
